/*
 * Copyright (c) 2001, 2002 Boris Pruessmann and others.
 * All rights reserved.   This program and the accompanying materials
 * are made available under the terms of the Common Public License v0.5
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/cpl-v05.html
 * 
 * Contributors:
 *    Boris Pruessmann - Initial implementation.
 */
package net.sourceforge.perforce.core.internal.api;

import net.sourceforge.perforce.api.IPerforceCommand;
import net.sourceforge.perforce.core.PerforceCorePlugin;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.MultiStatus;

/**
  * ClientUser object for the 'p4 reopen' command.
  * 
  * @version $Revision: 18 $
  * @author  <a href="mailto:bpruessmann@users.sourceforge.net">Boris Pruessmann</a>
  * 
  * TODO: Introduce IReopenResult
  */
public class Reopen extends AbstractPerforceCommand implements IPerforceCommand
{
	// --------------------------------------------------------------- Public Static Factory Methods
	
	/** Convenience method for creating instances of Reopen.
	  * 
	  * @return the new Reopen instance.
	  */
	public static final Reopen newInstance()
	{
		MultiStatus status = new MultiStatus(PerforceCorePlugin.ID, IStatus.OK, "", null); 
		return new Reopen(status);
	}

	// ------------------------------------------------------------------------ Private Constructors

	/** Constructor for Reopen.
	  * 
	  * @param status the MultiStatus object.
	  */
	private Reopen(MultiStatus status)
	{
		super(status);
	}	

	// -------------------------------------------------------- Public Methods (IClientUserDelegate)
	
	/** @see IClientUserDelegate#outputInfo(char, String) */
	public void outputInfo(char level, String infoString)
	{
	}

	// ----------------------------------------------------------- Public Methods (IPerforceCommand)

	/** @see IPerforceCommand#getCommand() */
	public String getCommand() 
	{ 
		return "reopen";                                                               //$NON-NLS-1$
	}

	/** @see IPerforceCommand#getStatus() */
	public IStatus getStatus() 
	{ 
		return getMultiStatus(); 
	}

	/** @see IPerforceCommand#isHidingFromConsole() */
	public boolean isHidingFromConsole() 
	{ 
		return true; 
	}
}
